/// \file A3200Parameter.h
/// \brief Contains the functions to retrieve and send parameters from or to the SMC.
///
/// Copyright (c) Aerotech, Inc. 2010-2015.
/// 

#ifndef __A3200_PARAMETER_H__
#define __A3200_PARAMETER_H__

#include "A3200CommonTypes.h"
#include "A3200ParameterId.h"

#ifdef __cplusplus
extern "C" {
#endif

/// \defgroup parameter Parameter Functions
/// @{

/// \brief Retrieves the value of a double parameter from the SMC.
///
/// This function will retrieve the value of one of the double type parameters to a double variable. 
///
/// \param[in] handle The handle to the A3200
/// \param[in] parameterId The ID number of the parameter.
/// \param[in] index The index of axis or task. Ignored for system parameters.
/// \param[out] value The retrieved double value of the parameter.
/// \return TRUE on success, FALSE if an error occurred. Call A3200GetLastError() for more information.
BOOL DLLENTRYDECLARATION A3200ParameterGetValue(A3200Handle handle, PARAMETERID parameterId, DWORD index, DOUBLE* value);

/// \brief Retrieves the value of a string parameter from the SMC.
///
/// This function will retrieve the value of one of the string type parameters to a string variable. 
///
/// Retrieve a string value of a parameter from te SMC.
///
/// \param[in] handle The handle to the A3200
/// \param[in] parameterId The ID number of the parameter.
/// \param[in] index The index of axis or task. Ignored for system parameters.
/// \param[in] size The number of characters to be retrieved
/// \param[out] value The retrieved string value of the parameter.
/// \return TRUE on success, FALSE if an error occurred. Call A3200GetLastError() for more information.
BOOL DLLENTRYDECLARATION A3200ParameterGetValueString(A3200Handle handle, PARAMETERID parameterId, DWORD index, ULONG size, LPSTR value);

/// \brief Sets the value of a double parameter on the SMC.
///
/// This function will send the value of one of the double type parameters to the SMC. 
///
/// \param[in] handle The handle to the A3200
/// \param[in] parameterId The ID number of the parameter.
/// \param[in] index The index of axis or task. Ignored for system parameters.
/// \param[in] value The double value of the parameter to be sent.
/// \return TRUE on success, FALSE if an error occurred. Call A3200GetLastError() for more information.
BOOL DLLENTRYDECLARATION A3200ParameterSetValue(A3200Handle handle, PARAMETERID parameterId, DWORD index, DOUBLE value);

/// \brief Sends the value of a string parameter to the SMC.
///
/// This function will send the value of one of the string type parameters to the SMC. 
///
/// \param[in] handle The handle to the A3200
/// \param[in] parameterId The ID number of the parameter.
/// \param[in] index The index of axis or task. Ignored for system parameters.
/// \param[in] value The string value of the parameter to be sent.
/// \return TRUE on success, FALSE if an error occurred. Call A3200GetLastError() for more information.
BOOL DLLENTRYDECLARATION A3200ParameterSetValueString(A3200Handle handle, PARAMETERID parameterId, DWORD index, LPCSTR value);

/// @}

#ifdef __cplusplus
}
#endif

#endif // __A3200_PARAMETER_H__
